<template>
<!--  :infinite-scroll-delay="200" :infinite-scroll-immediate="true" -->
    <ul v-infinite-scroll="load" class="infinite-list" style="overflow: auto">
        <li v-for="i in count" :key="i" class="infinite-list-item">{{ i }}</li>
    </ul>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue'
export default defineComponent({
    setup() {
        const count = ref(0)
        const load = () => {
            count.value += 1
        }
        return {
            load,
            count
        }
    }
})
</script>
<style>
.infinite-list {
    height: 300px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.infinite-list .infinite-list-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    background: blue;
    margin: 10px;
    color: red;
}
.infinite-list .infinite-list-item + .list-item {
    margin-top: 10px;
}
</style>